<?php

namespace App\Console\Commands\Mybank;

use App\Kuafu\Mybank\Service\MybankService;
use App\Kuafu\Order\Model\OrderCouponSplitModel;
use App\Kuafu\Order\Model\OrderDetailSplitModel;
use App\Kuafu\Order\Model\OrderDiscountSplitModel;
use App\Kuafu\Order\Model\OrderExternalSplitModel;
use App\Kuafu\Order\Model\OrderPayUnionSplitModel;
use App\Kuafu\Order\Model\OrderSplitModel;
use App\Kuafu\Pay\Model\PayStreamModel;
use App\Kuafu\Shop\Model\Shop;
use App\Kuafu\WaiMai\Model\WaiMaiOrderDetailModel;
use App\Kuafu\WaiMai\Model\WaiMaiOrderIdShopIdMappingModel;
use App\Kuafu\WaiMai\Model\WaiMaiOrderModel;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;

class QueryAccountBalanceCommand extends Command
{
    protected $signature = 'mybank:query-account-balance';

    protected $description = '网商获取监管账户的余额';

    public function handle()
    {
        $mbServer = new MybankService();
        $balance  = $mbServer->getAccountBalance();

//        dd($balance);
        Log::channel('mybank')->notice('网商监管账户当前余额', [
                '余额:' => $balance['balance'] / 100 . '元'
            ]
        );
    }
}
